<template>
  <div>
    <PersonList/><hr>
    <Count :num="num" ref="countEle"/><hr>
     <Count :num="num/2*3" ref="countEle1"/>
     <button @click="getRef">change</button>
  </div>
</template>

<script>
import PersonList from "./components/personList/";
import Count from "./components/Count/";
export default {
  name: "app",
  components: {
    PersonList,
    Count,
  },
  data() {
    return {
      star: "♥",
    };
  },
  methods: {
    getRef() {
      this.$refs.countEle.increment()
      this.$refs.countEle1.increment()
    },
  },
  computed: {
    num() {
      return Math.floor(Math.random() * 100);
    },
  },
};
</script>

<style>
body {
  margin: 0;
  padding: 0;
}
</style>
